<template>
  <!--父级路由和子级路由的选择-->
  <router-view v-if="$route.path !== '/treasure'"></router-view>

  <div class="treasure" v-else>
    <content-wrapper :wrapper="wrapper"></content-wrapper>
    <block-card :products="tableData"></block-card>
  </div>
</template>

<script>
import ContentWrapper from "@/components/treasure/ContentWrapper.vue";
import BlockCard from "@/components/treasure/BlockCard.vue";
export default {
  components: { ContentWrapper, BlockCard},
  data() {
    return {
      tableData: [],
    };
  },
  methods: {
    filmdetail(e) {
      // window.location.href = e,'_blank'
      window.open(e, "_blank");
    },
  },
  mounted() {
    var _this = this;
    this.$http.get("/showfilm/v1/show").then(function (response) {
      console.log(response.data);
      _this.tableData = response.data;
    });
  },
};
</script>

<style lang="scss" scoped>
.treasure {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  color: #fff;
  padding: 20px 40px;
  height: 100%;
  overflow: auto;
  background-color: #fff;
  @media screen and (max-width: 510px) {
    padding: 20px;
  }
}
</style>>

